//
//  PywMacro.h
//  PywSdk
//
//  Created by Jade on 16/7/29.
//  Copyright © 2016年 zero. All rights reserved.
//



#define DEBUG_LOG

#ifdef DEBUG_LOG
#define CLOG(fm, logLevel) [PywLog writeLog:logLevel withFunction:__FUNCTION__ lineNumber:__LINE__ format: fm]
#else
#define CLOG(fm, logLevel)
#endif

/*  RSA_Public_key  */
#define RSA_Public_key   @"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCnHws3kjOS+FumpUWtCcl9Hi2AMNcnXXES3uUloR83D6UnsTlyLATarYgFdmFXK67iB9MPtTYzYzQKRkPigBmmotCxJDheWVCnsnFEDTe+SSNnpa+zxNecT5vBR4PNcm8LfnFOcwjEYHGmjVMFWZxd+58UdsWdbH4GMM2lD8Ay7QIDAQAB"


#define BundleName @"PywBundle"

// SDK版本号（每次打包都需要更新版本号）下个版本直接从2.2.28升至2.2.30，另2.2.29为一个原生微信支付特有分支
#define VERSION @"2.2.28"

/*
 * 固定URL定义
 */
// 免责声明Url
#define mianZeShengMingUrl @"https://apisdk.pyw.cn/DisclaimerView/index"

// 实名认证Url
#define shiMingRenZhengUrl @"https://apisdk.pyw.cn/IdCardVerifyView/index2"

// H5支付Url
#define webH5PayUrl @"https://pay.pyw.cn/pay/wx_checkout"

// 埋点需求，用户行为数据统计上报Url
#define userActionDataUrl @"https://dt.pyw.cn/sdk/userActionData"

#define IS_IPAD (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
#define IS_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)

#define SCREEN_WIDTH [[UIScreen mainScreen] bounds].size.width
#define SCREEN_HEIGHT [[UIScreen mainScreen] bounds].size.height
#define SCREEN_MAX_LENGTH (MAX(SCREEN_WIDTH, SCREEN_HEIGHT))
#define SCREEN_MIN_LENGTH (MIN(SCREEN_WIDTH, SCREEN_HEIGHT))

#define iOS7 ([[UIDevice currentDevice].systemVersion doubleValue] >= 7.0)
#define iOS8 ([[UIDevice currentDevice].systemVersion doubleValue] >= 8.0)

#define IS_IPHONE_4_OR_LESS (IS_IPHONE && SCREEN_MAX_LENGTH < 568.0)
#define IS_IPHONE_5 (IS_IPHONE && SCREEN_MAX_LENGTH == 568.0)
#define IS_IPHONE_6 (IS_IPHONE && SCREEN_MAX_LENGTH == 667.0)
#define IS_IPHONE_6P (IS_IPHONE && SCREEN_MAX_LENGTH == 736.0)

// Font
#define PywFont18 IS_IPAD ? [UIFont systemFontOfSize:23] : IS_IPHONE_6P ? [UIFont systemFontOfSize:20] : [UIFont systemFontOfSize:18]
#define PywFont15 IS_IPAD ? [UIFont systemFontOfSize:20] : IS_IPHONE_6P ? [UIFont systemFontOfSize:19] : [UIFont systemFontOfSize:15]


/** 颜色 */
#define RGB(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)]
// 十六进制
#define UIColorFromRGB(rgbValue) [UIColor \
colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]


/*  self  */
#define WEAK_SELF __weak __typeof(&*self)weakSelf = self
#define STRONG_SELF(self) __strong __typeof(&*self) strongSelf = self


//#endif
